package com.fr.data;

import com.fr.base.XMLable;
import com.fr.base.core.ComparatorUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.data.condition.Condition;
import com.fr.report.script.Calculator;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public abstract interface Dictionary extends XMLable
{
  public static final String XML_TAG = "Dictionary";
  public static final Dictionary EMPTY_DICT = new AbstractDict()
  {
    private static final long serialVersionUID = 7548882551923111630L;

    public Iterator entrys(Calculator paramCalculator)
    {
      return Collections.EMPTY_LIST.iterator();
    }

    public Object get(Object paramObject, Calculator paramCalculator)
    {
      return null;
    }

    public String[] getDependence()
    {
      return new String[0];
    }

    public void readXML(XMLableReader paramXMLableReader)
    {
    }

    public void writeXML(XMLPrintWriter paramXMLPrintWriter)
    {
    }

    public Object clone()
      throws CloneNotSupportedException
    {
      return super.clone();
    }
  };

  public abstract Object get(Object paramObject, Calculator paramCalculator);

  public abstract Iterator entrys(Calculator paramCalculator);

  public abstract Condition getCondition();

  public abstract void setCondition(Condition paramCondition);

  public abstract void reset();

  public abstract String[] getDependence();

  public static class MV
  {
    private Object model;
    private Object view;

    public MV(Object paramObject1, Object paramObject2)
    {
      this.model = paramObject1;
      this.view = paramObject2;
    }

    public Object getModel()
    {
      return this.model;
    }

    public Object getView()
    {
      return this.view;
    }

    public boolean equals(Object paramObject)
    {
      return ((paramObject instanceof MV) && (ComparatorUtils.equals(((MV)paramObject).model, this.model)) && (ComparatorUtils.equals(((MV)paramObject).view, this.view)));
    }
  }
}